#!/usr/bin/env python
# -*- coding: utf-8 -*-

import otfinst
import unittest

# ==============================================================================
class TestSequenceFunctions(unittest.TestCase):

    def test_processSubfamily(self):
        self.assertEqual( otfinst.processSubfamily( 'Italic Black' ),
                          { 'width': [], 'weight': 'black', 'slope': 'italic' } )
        self.assertEqual( otfinst.processSubfamily( 'RegularThin' ),
                          { 'width': [], 'weight': 'thin', 'slope': [] } )
        self.assertEqual( otfinst.processSubfamily( 'Light Italic SmCp' ),
                          { 'width': [], 'weight': 'light', 'slope': 'italic', 'extra':'smcp'} )
        self.assertEqual( otfinst.processSubfamily( 'Condensed Regular Ultrathin' ),
                          { 'width': 'condensed', 'weight': 'ultrathin', 'slope': [] } )
        self.assertEqual( otfinst.processSubfamily( '49 Light Ultra Condensed' ),
                          { 'width': 'ultracondensed', 'weight': 'light', 'slope': [] } )
# ==============================================================================
if __name__ == '__main__':
    unittest.main()
# ==============================================================================